<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<% String path = request.getContextPath(); %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<fmt:setBundle basename="i18n.com.common" var="common"/>
<fmt:setBundle basename="i18n.gos.company.msg" var="company"/>
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'center'" style="padding:20px;">
	 <form id="gos_company_edit" class="easyui-form" action="${path}/gos/company/upd"  method="post" data-options="novalidate:false">
	 	<input type="hidden" name="id" value="${dt.id }">
	 	<input type="hidden" name="version" value="${dt.version }">
		<div style="margin-bottom:10px;">
			<input class="easyui-combogrid" value="${dt.parent.id }" prompt='<fmt:message key="prompt.parent" bundle="${company}"/>' name="parent.id" style="width:70%;"  label='<fmt:message key="parent" bundle="${company}"/>'
			data-options=" delay: 500,  mode: 'remote', pagination : true,   url: '${path }/gos/company/list',
				 		  idField: 'id', textField: 'name',	
				 		  queryParams:{q:'${dt.parent.id }'},			 		     
				 		   columns: [[
				        {field:'name',title:'<fmt:message key="c_name" bundle="${company}"/>',width:110},
				        {field:'addr',title:'<fmt:message key="c_addr" bundle="${company}"/>',width:120},
				        {field:'status',title:'<fmt:message key="status" bundle="${company}"/>',width:80}  ]] ">
		 
		</div>
		<div style="margin-bottom:10px;">
			<input class="easyui-textbox" value="${dt.name }" prompt='<fmt:message key="prompt.c_name" bundle="${company}"/>' name="name" style="width:70%;" data-options="label:'<fmt:message key="c_name" bundle="${company}"/>',required:true">
		</div>
		<div style="margin-bottom:10px;">
			<input class="easyui-textbox" value="${dt.email }" prompt='<fmt:message key="prompt.c_email" bundle="${company}"/>' name="email" style="width:70%;" data-options="label:'<fmt:message key="c_email" bundle="${company}"/>',required:true,validType:'email'">
		</div> 
	 	<div style="margin-bottom:10px;">
			<input class="easyui-textbox" value="${dt.addr }" prompt='<fmt:message key="prompt.c_addr" bundle="${company}"/>' name="addr" style="width:70%;" data-options="label:'<fmt:message key="c_addr" bundle="${company}"/>',required:true">
		</div>
	 	<div style="margin-bottom:10px;">
			<input class="easyui-textbox" value="${dt.tel }" prompt='<fmt:message key="prompt.c_tel" bundle="${company}"/>' name="tel" style="width:70%;" data-options="label:'<fmt:message key="c_tel" bundle="${company}"/>',required:true">
		</div>
		<div style="margin-bottom:10px;">
			<input class="easyui-textbox" value="${dt.fax }" prompt='<fmt:message key="prompt.c_fax" bundle="${company}"/>' name="fax" style="width:70%;" data-options="label:'<fmt:message key="c_fax" bundle="${company}"/>',required:true">
		</div> 
		<div style="margin-bottom:10px;">
		    <select  label="<fmt:message key="status" bundle="${company}"/>" class="easyui-combobox" name="status" style="width:200px;" >
			        <option value="E" <c:if test="${dt.status=='E' }">selected="selected"</c:if> ><fmt:message key="status.E" bundle="${company}"/></option>
			        <option value="D" <c:if test="${dt.status=='D' }">selected="selected"</c:if> ><fmt:message key="status.D" bundle="${company}"/></option>
   			 </select>			
		</div> 		
	</form>  
</div>
	<div data-options="region:'south',border:false" style="text-align:center;padding:5px;">
		<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="gos_submit('gos_win','gos_company_edit','gos_company_index_dg','gos_company_search'); " style="width:80px"><fmt:message key="func.save" bundle="${common}"/></a>
		<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="gos_close('gos_win');" style="width:80px"><fmt:message key="func.cancel" bundle="${common}"/></a>
	</div>
</div>